package com.neusoft.dibuy.tyut.net.client;

import com.neusoft.dibuy.tyut.net.cfg.NetConfig;
import com.neusoft.dibuy.tyut.net.util.File2NetTool;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;
import java.nio.charset.StandardCharsets;
import java.util.Date;

public class ClientDemo2 {
    public static void main(String[] args) throws  IOException {
//        D:\a.tgz
        String filePath = "D:\\a.tgz";
        String ip = "127.0.0.1";
        int port = NetConfig.MSG_PORT;
        File2NetTool file2NetTool = new File2NetTool(filePath, ip, port);
        long sendFile = file2NetTool.sendFile();
        System.out.println(sendFile);
    }
}
